package leecode

import "strings"

func isSubstringPresent(s string) bool {
	arr := []byte(s)
	for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {
		arr[i], arr[j] = arr[j], arr[i]
	}
	str := string(arr)
	for i := 0; i+2 <= len(s); i++ {
		if strings.Contains(s, s[i:i+2]) && strings.Contains(str, s[i:i+2]) {
			return true
		}
	}
	return false
}
